package com.bl.util;



import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;

public class JSUtil {
	public static Invocable invoke;
	public static String GET_VISTOR_ID = "var navigator=navigator||{};\r\n" + 
			"\r\n" + 
			"var dbits;\r\n" + 
			"var canary = 0xdeadbeefcafe;\r\n" + 
			"var j_lm = ((canary & 0xffffff) == 0xefcafe);\r\n" + 
			"function BigInteger(a, b, c) {\r\n" + 
			"    if (a != null) if (\"number\" == typeof a) this.fromNumber(a, b, c);\r\n" + 
			"    else if (b == null && \"string\" != typeof a) this.fromString(a, 256);\r\n" + 
			"    else this.fromString(a, b);\r\n" + 
			"}\r\n" + 
			"function nbi() {\r\n" + 
			"    return new BigInteger(null);\r\n" + 
			"}\r\n" + 
			"function am1(i, x, w, j, c, n) {\r\n" + 
			"    while (--n >= 0) {\r\n" + 
			"        var v = x * this[i++] + w[j] + c;\r\n" + 
			"        c = Math.floor(v / 0x4000000);\r\n" + 
			"        w[j++] = v & 0x3ffffff;\r\n" + 
			"    }\r\n" + 
			"    return c;\r\n" + 
			"}\r\n" + 
			"function am2(i, x, w, j, c, n) {\r\n" + 
			"    var xl = x & 0x7fff,\r\n" + 
			"    xh = x >> 15;\r\n" + 
			"    while (--n >= 0) {\r\n" + 
			"        var l = this[i] & 0x7fff;\r\n" + 
			"        var h = this[i++] >> 15;\r\n" + 
			"        var m = xh * l + h * xl;\r\n" + 
			"        l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\r\n" + 
			"        c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\r\n" + 
			"        w[j++] = l & 0x3fffffff;\r\n" + 
			"    }\r\n" + 
			"    return c;\r\n" + 
			"}\r\n" + 
			"function am3(i, x, w, j, c, n) {\r\n" + 
			"    var xl = x & 0x3fff,\r\n" + 
			"    xh = x >> 14;\r\n" + 
			"    while (--n >= 0) {\r\n" + 
			"        var l = this[i] & 0x3fff;\r\n" + 
			"        var h = this[i++] >> 14;\r\n" + 
			"        var m = xh * l + h * xl;\r\n" + 
			"        l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\r\n" + 
			"        c = (l >> 28) + (m >> 14) + xh * h;\r\n" + 
			"        w[j++] = l & 0xfffffff;\r\n" + 
			"    }\r\n" + 
			"    return c;\r\n" + 
			"}\r\n" + 
			"if (j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\r\n" + 
			"    BigInteger.prototype.am = am2;\r\n" + 
			"    dbits = 30;\r\n" + 
			"} else if (j_lm && (navigator.appName != \"Netscape\")) {\r\n" + 
			"    BigInteger.prototype.am = am1;\r\n" + 
			"    dbits = 26;\r\n" + 
			"} else {\r\n" + 
			"    BigInteger.prototype.am = am3;\r\n" + 
			"    dbits = 28;\r\n" + 
			"}\r\n" + 
			"BigInteger.prototype.DB = dbits;\r\n" + 
			"BigInteger.prototype.DM = ((1 << dbits) - 1);\r\n" + 
			"BigInteger.prototype.DV = (1 << dbits);\r\n" + 
			"var BI_FP = 52;\r\n" + 
			"BigInteger.prototype.FV = Math.pow(2, BI_FP);\r\n" + 
			"BigInteger.prototype.F1 = BI_FP - dbits;\r\n" + 
			"BigInteger.prototype.F2 = 2 * dbits - BI_FP;\r\n" + 
			"var BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\r\n" + 
			"var BI_RC = new Array();\r\n" + 
			"var rr, vv;\r\n" + 
			"rr = \"0\".charCodeAt(0);\r\n" + 
			"for (vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;\r\n" + 
			"rr = \"a\".charCodeAt(0);\r\n" + 
			"for (vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\r\n" + 
			"rr = \"A\".charCodeAt(0);\r\n" + 
			"for (vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\r\n" + 
			"function int2char(n) {\r\n" + 
			"    return BI_RM.charAt(n);\r\n" + 
			"}\r\n" + 
			"function intAt(s, i) {\r\n" + 
			"    var c = BI_RC[s.charCodeAt(i)];\r\n" + 
			"    return (c == null) ? -1 : c;\r\n" + 
			"}\r\n" + 
			"function bnpCopyTo(r) {\r\n" + 
			"    for (var i = this.t - 1; i >= 0; --i) r[i] = this[i];\r\n" + 
			"    r.t = this.t;\r\n" + 
			"    r.s = this.s;\r\n" + 
			"}\r\n" + 
			"function bnpFromInt(x) {\r\n" + 
			"    this.t = 1;\r\n" + 
			"    this.s = (x < 0) ? -1 : 0;\r\n" + 
			"    if (x > 0) this[0] = x;\r\n" + 
			"    else if (x < -1) this[0] = x + DV;\r\n" + 
			"    else this.t = 0;\r\n" + 
			"}\r\n" + 
			"function nbv(i) {\r\n" + 
			"    var r = nbi();\r\n" + 
			"    r.fromInt(i);\r\n" + 
			"    return r;\r\n" + 
			"}\r\n" + 
			"function bnpFromString(s, b) {\r\n" + 
			"    var k;\r\n" + 
			"    if (b == 16) k = 4;\r\n" + 
			"    else if (b == 8) k = 3;\r\n" + 
			"    else if (b == 256) k = 8;\r\n" + 
			"    else if (b == 2) k = 1;\r\n" + 
			"    else if (b == 32) k = 5;\r\n" + 
			"    else if (b == 4) k = 2;\r\n" + 
			"    else {\r\n" + 
			"        this.fromRadix(s, b);\r\n" + 
			"        return;\r\n" + 
			"    }\r\n" + 
			"    this.t = 0;\r\n" + 
			"    this.s = 0;\r\n" + 
			"    var i = s.length,\r\n" + 
			"    mi = false,\r\n" + 
			"    sh = 0;\r\n" + 
			"    while (--i >= 0) {\r\n" + 
			"        var x = (k == 8) ? s[i] & 0xff: intAt(s, i);\r\n" + 
			"        if (x < 0) {\r\n" + 
			"            if (s.charAt(i) == \"-\") mi = true;\r\n" + 
			"            continue;\r\n" + 
			"        }\r\n" + 
			"        mi = false;\r\n" + 
			"        if (sh == 0) this[this.t++] = x;\r\n" + 
			"        else if (sh + k > this.DB) {\r\n" + 
			"            this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;\r\n" + 
			"            this[this.t++] = (x >> (this.DB - sh));\r\n" + 
			"        } else this[this.t - 1] |= x << sh;\r\n" + 
			"        sh += k;\r\n" + 
			"        if (sh >= this.DB) sh -= this.DB;\r\n" + 
			"    }\r\n" + 
			"    if (k == 8 && (s[0] & 0x80) != 0) {\r\n" + 
			"        this.s = -1;\r\n" + 
			"        if (sh > 0) this[this.t - 1] |= ((1 << (this.DB - sh)) - 1) << sh;\r\n" + 
			"    }\r\n" + 
			"    this.clamp();\r\n" + 
			"    if (mi) BigInteger.ZERO.subTo(this, this);\r\n" + 
			"}\r\n" + 
			"function bnpClamp() {\r\n" + 
			"    var c = this.s & this.DM;\r\n" + 
			"    while (this.t > 0 && this[this.t - 1] == c)--this.t;\r\n" + 
			"}\r\n" + 
			"function bnToString(b) {\r\n" + 
			"    if (this.s < 0) return \"-\" + this.negate().toString(b);\r\n" + 
			"    var k;\r\n" + 
			"    if (b == 16) k = 4;\r\n" + 
			"    else if (b == 8) k = 3;\r\n" + 
			"    else if (b == 2) k = 1;\r\n" + 
			"    else if (b == 32) k = 5;\r\n" + 
			"    else if (b == 4) k = 2;\r\n" + 
			"    else return this.toRadix(b);\r\n" + 
			"    var km = (1 << k) - 1,\r\n" + 
			"    d,\r\n" + 
			"    m = false,\r\n" + 
			"    r = \"\",\r\n" + 
			"    i = this.t;\r\n" + 
			"    var p = this.DB - (i * this.DB) % k;\r\n" + 
			"    if (i-->0) {\r\n" + 
			"        if (p < this.DB && (d = this[i] >> p) > 0) {\r\n" + 
			"            m = true;\r\n" + 
			"            r = int2char(d);\r\n" + 
			"        }\r\n" + 
			"        while (i >= 0) {\r\n" + 
			"            if (p < k) {\r\n" + 
			"                d = (this[i] & ((1 << p) - 1)) << (k - p);\r\n" + 
			"                d |= this[--i] >> (p += this.DB - k);\r\n" + 
			"            } else {\r\n" + 
			"                d = (this[i] >> (p -= k)) & km;\r\n" + 
			"                if (p <= 0) {\r\n" + 
			"                    p += this.DB; --i;\r\n" + 
			"                }\r\n" + 
			"            }\r\n" + 
			"            if (d > 0) m = true;\r\n" + 
			"            if (m) r += int2char(d);\r\n" + 
			"        }\r\n" + 
			"    }\r\n" + 
			"    return m ? r: \"0\";\r\n" + 
			"}\r\n" + 
			"function bnNegate() {\r\n" + 
			"    var r = nbi();\r\n" + 
			"    BigInteger.ZERO.subTo(this, r);\r\n" + 
			"    return r;\r\n" + 
			"}\r\n" + 
			"function bnAbs() {\r\n" + 
			"    return (this.s < 0) ? this.negate() : this;\r\n" + 
			"}\r\n" + 
			"function bnCompareTo(a) {\r\n" + 
			"    var r = this.s - a.s;\r\n" + 
			"    if (r != 0) return r;\r\n" + 
			"    var i = this.t;\r\n" + 
			"    r = i - a.t;\r\n" + 
			"    if (r != 0) return r;\r\n" + 
			"    while (--i >= 0) if ((r = this[i] - a[i]) != 0) return r;\r\n" + 
			"    return 0;\r\n" + 
			"}\r\n" + 
			"function nbits(x) {\r\n" + 
			"    var r = 1,\r\n" + 
			"    t;\r\n" + 
			"    if ((t = x >>> 16) != 0) {\r\n" + 
			"        x = t;\r\n" + 
			"        r += 16;\r\n" + 
			"    }\r\n" + 
			"    if ((t = x >> 8) != 0) {\r\n" + 
			"        x = t;\r\n" + 
			"        r += 8;\r\n" + 
			"    }\r\n" + 
			"    if ((t = x >> 4) != 0) {\r\n" + 
			"        x = t;\r\n" + 
			"        r += 4;\r\n" + 
			"    }\r\n" + 
			"    if ((t = x >> 2) != 0) {\r\n" + 
			"        x = t;\r\n" + 
			"        r += 2;\r\n" + 
			"    }\r\n" + 
			"    if ((t = x >> 1) != 0) {\r\n" + 
			"        x = t;\r\n" + 
			"        r += 1;\r\n" + 
			"    }\r\n" + 
			"    return r;\r\n" + 
			"}\r\n" + 
			"function bnBitLength() {\r\n" + 
			"    if (this.t <= 0) return 0;\r\n" + 
			"    return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));\r\n" + 
			"}\r\n" + 
			"function bnpDLShiftTo(n, r) {\r\n" + 
			"    var i;\r\n" + 
			"    for (i = this.t - 1; i >= 0; --i) r[i + n] = this[i];\r\n" + 
			"    for (i = n - 1; i >= 0; --i) r[i] = 0;\r\n" + 
			"    r.t = this.t + n;\r\n" + 
			"    r.s = this.s;\r\n" + 
			"}\r\n" + 
			"function bnpDRShiftTo(n, r) {\r\n" + 
			"    for (var i = n; i < this.t; ++i) r[i - n] = this[i];\r\n" + 
			"    r.t = Math.max(this.t - n, 0);\r\n" + 
			"    r.s = this.s;\r\n" + 
			"}\r\n" + 
			"function bnpLShiftTo(n, r) {\r\n" + 
			"    var bs = n % this.DB;\r\n" + 
			"    var cbs = this.DB - bs;\r\n" + 
			"    var bm = (1 << cbs) - 1;\r\n" + 
			"    var ds = Math.floor(n / this.DB),\r\n" + 
			"    c = (this.s << bs) & this.DM,\r\n" + 
			"    i;\r\n" + 
			"    for (i = this.t - 1; i >= 0; --i) {\r\n" + 
			"        r[i + ds + 1] = (this[i] >> cbs) | c;\r\n" + 
			"        c = (this[i] & bm) << bs;\r\n" + 
			"    }\r\n" + 
			"    for (i = ds - 1; i >= 0; --i) r[i] = 0;\r\n" + 
			"    r[ds] = c;\r\n" + 
			"    r.t = this.t + ds + 1;\r\n" + 
			"    r.s = this.s;\r\n" + 
			"    r.clamp();\r\n" + 
			"}\r\n" + 
			"function bnpRShiftTo(n, r) {\r\n" + 
			"    r.s = this.s;\r\n" + 
			"    var ds = Math.floor(n / this.DB);\r\n" + 
			"    if (ds >= this.t) {\r\n" + 
			"        r.t = 0;\r\n" + 
			"        return;\r\n" + 
			"    }\r\n" + 
			"    var bs = n % this.DB;\r\n" + 
			"    var cbs = this.DB - bs;\r\n" + 
			"    var bm = (1 << bs) - 1;\r\n" + 
			"    r[0] = this[ds] >> bs;\r\n" + 
			"    for (var i = ds + 1; i < this.t; ++i) {\r\n" + 
			"        r[i - ds - 1] |= (this[i] & bm) << cbs;\r\n" + 
			"        r[i - ds] = this[i] >> bs;\r\n" + 
			"    }\r\n" + 
			"    if (bs > 0) r[this.t - ds - 1] |= (this.s & bm) << cbs;\r\n" + 
			"    r.t = this.t - ds;\r\n" + 
			"    r.clamp();\r\n" + 
			"}\r\n" + 
			"function bnpSubTo(a, r) {\r\n" + 
			"    var i = 0,\r\n" + 
			"    c = 0,\r\n" + 
			"    m = Math.min(a.t, this.t);\r\n" + 
			"    while (i < m) {\r\n" + 
			"        c += this[i] - a[i];\r\n" + 
			"        r[i++] = c & this.DM;\r\n" + 
			"        c >>= this.DB;\r\n" + 
			"    }\r\n" + 
			"    if (a.t < this.t) {\r\n" + 
			"        c -= a.s;\r\n" + 
			"        while (i < this.t) {\r\n" + 
			"            c += this[i];\r\n" + 
			"            r[i++] = c & this.DM;\r\n" + 
			"            c >>= this.DB;\r\n" + 
			"        }\r\n" + 
			"        c += this.s;\r\n" + 
			"    } else {\r\n" + 
			"        c += this.s;\r\n" + 
			"        while (i < a.t) {\r\n" + 
			"            c -= a[i];\r\n" + 
			"            r[i++] = c & this.DM;\r\n" + 
			"            c >>= this.DB;\r\n" + 
			"        }\r\n" + 
			"        c -= a.s;\r\n" + 
			"    }\r\n" + 
			"    r.s = (c < 0) ? -1 : 0;\r\n" + 
			"    if (c < -1) r[i++] = this.DV + c;\r\n" + 
			"    else if (c > 0) r[i++] = c;\r\n" + 
			"    r.t = i;\r\n" + 
			"    r.clamp();\r\n" + 
			"}\r\n" + 
			"function bnpMultiplyTo(a, r) {\r\n" + 
			"    var x = this.abs(),\r\n" + 
			"    y = a.abs();\r\n" + 
			"    var i = x.t;\r\n" + 
			"    r.t = i + y.t;\r\n" + 
			"    while (--i >= 0) r[i] = 0;\r\n" + 
			"    for (i = 0; i < y.t; ++i) r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\r\n" + 
			"    r.s = 0;\r\n" + 
			"    r.clamp();\r\n" + 
			"    if (this.s != a.s) BigInteger.ZERO.subTo(r, r);\r\n" + 
			"}\r\n" + 
			"function bnpSquareTo(r) {\r\n" + 
			"    var x = this.abs();\r\n" + 
			"    var i = r.t = 2 * x.t;\r\n" + 
			"    while (--i >= 0) r[i] = 0;\r\n" + 
			"    for (i = 0; i < x.t - 1; ++i) {\r\n" + 
			"        var c = x.am(i, x[i], r, 2 * i, 0, 1);\r\n" + 
			"        if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {\r\n" + 
			"            r[i + x.t] -= x.DV;\r\n" + 
			"            r[i + x.t + 1] = 1;\r\n" + 
			"        }\r\n" + 
			"    }\r\n" + 
			"    if (r.t > 0) r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\r\n" + 
			"    r.s = 0;\r\n" + 
			"    r.clamp();\r\n" + 
			"}\r\n" + 
			"function bnpDivRemTo(m, q, r) {\r\n" + 
			"    var pm = m.abs();\r\n" + 
			"    if (pm.t <= 0) return;\r\n" + 
			"    var pt = this.abs();\r\n" + 
			"    if (pt.t < pm.t) {\r\n" + 
			"        if (q != null) q.fromInt(0);\r\n" + 
			"        if (r != null) this.copyTo(r);\r\n" + 
			"        return;\r\n" + 
			"    }\r\n" + 
			"    if (r == null) r = nbi();\r\n" + 
			"    var y = nbi(),\r\n" + 
			"    ts = this.s,\r\n" + 
			"    ms = m.s;\r\n" + 
			"    var nsh = this.DB - nbits(pm[pm.t - 1]);\r\n" + 
			"    if (nsh > 0) {\r\n" + 
			"        pm.lShiftTo(nsh, y);\r\n" + 
			"        pt.lShiftTo(nsh, r);\r\n" + 
			"    } else {\r\n" + 
			"        pm.copyTo(y);\r\n" + 
			"        pt.copyTo(r);\r\n" + 
			"    }\r\n" + 
			"    var ys = y.t;\r\n" + 
			"    var y0 = y[ys - 1];\r\n" + 
			"    if (y0 == 0) return;\r\n" + 
			"    var yt = y0 * (1 << this.F1) + ((ys > 1) ? y[ys - 2] >> this.F2: 0);\r\n" + 
			"    var d1 = this.FV / yt,\r\n" + 
			"    d2 = (1 << this.F1) / yt,\r\n" + 
			"    e = 1 << this.F2;\r\n" + 
			"    var i = r.t,\r\n" + 
			"    j = i - ys,\r\n" + 
			"    t = (q == null) ? nbi() : q;\r\n" + 
			"    y.dlShiftTo(j, t);\r\n" + 
			"    if (r.compareTo(t) >= 0) {\r\n" + 
			"        r[r.t++] = 1;\r\n" + 
			"        r.subTo(t, r);\r\n" + 
			"    }\r\n" + 
			"    BigInteger.ONE.dlShiftTo(ys, t);\r\n" + 
			"    t.subTo(y, y);\r\n" + 
			"    while (y.t < ys) y[y.t++] = 0;\r\n" + 
			"    while (--j >= 0) {\r\n" + 
			"\r\n" + 
			"        var qd = (r[--i] == y0) ? this.DM: Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\r\n" + 
			"        if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) {\r\n" + 
			"            y.dlShiftTo(j, t);\r\n" + 
			"            r.subTo(t, r);\r\n" + 
			"            while (r[i] < --qd) r.subTo(t, r);\r\n" + 
			"        }\r\n" + 
			"    }\r\n" + 
			"    if (q != null) {\r\n" + 
			"        r.drShiftTo(ys, q);\r\n" + 
			"        if (ts != ms) BigInteger.ZERO.subTo(q, q);\r\n" + 
			"    }\r\n" + 
			"    r.t = ys;\r\n" + 
			"    r.clamp();\r\n" + 
			"    if (nsh > 0) r.rShiftTo(nsh, r);\r\n" + 
			"    if (ts < 0) BigInteger.ZERO.subTo(r, r);\r\n" + 
			"}\r\n" + 
			"function bnMod(a) {\r\n" + 
			"    var r = nbi();\r\n" + 
			"    this.abs().divRemTo(a, null, r);\r\n" + 
			"    if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r, r);\r\n" + 
			"    return r;\r\n" + 
			"}\r\n" + 
			"function Classic(m) {\r\n" + 
			"    this.m = m;\r\n" + 
			"}\r\n" + 
			"function cConvert(x) {\r\n" + 
			"    if (x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);\r\n" + 
			"    else return x;\r\n" + 
			"}\r\n" + 
			"function cRevert(x) {\r\n" + 
			"    return x;\r\n" + 
			"}\r\n" + 
			"function cReduce(x) {\r\n" + 
			"    x.divRemTo(this.m, null, x);\r\n" + 
			"}\r\n" + 
			"function cMulTo(x, y, r) {\r\n" + 
			"    x.multiplyTo(y, r);\r\n" + 
			"    this.reduce(r);\r\n" + 
			"}\r\n" + 
			"function cSqrTo(x, r) {\r\n" + 
			"    x.squareTo(r);\r\n" + 
			"    this.reduce(r);\r\n" + 
			"}\r\n" + 
			"Classic.prototype.convert = cConvert;\r\n" + 
			"Classic.prototype.revert = cRevert;\r\n" + 
			"Classic.prototype.reduce = cReduce;\r\n" + 
			"Classic.prototype.mulTo = cMulTo;\r\n" + 
			"Classic.prototype.sqrTo = cSqrTo;\r\n" + 
			"function bnpInvDigit() {\r\n" + 
			"    if (this.t < 1) return 0;\r\n" + 
			"    var x = this[0];\r\n" + 
			"    if ((x & 1) == 0) return 0;\r\n" + 
			"    var y = x & 3;\r\n" + 
			"    y = (y * (2 - (x & 0xf) * y)) & 0xf;\r\n" + 
			"    y = (y * (2 - (x & 0xff) * y)) & 0xff;\r\n" + 
			"    y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff;\r\n" + 
			"\r\n" + 
			"    y = (y * (2 - x * y % this.DV)) % this.DV;\r\n" + 
			"\r\n" + 
			"    return (y > 0) ? this.DV - y: -y;\r\n" + 
			"}\r\n" + 
			"function Montgomery(m) {\r\n" + 
			"    this.m = m;\r\n" + 
			"    this.mp = m.invDigit();\r\n" + 
			"    this.mpl = this.mp & 0x7fff;\r\n" + 
			"    this.mph = this.mp >> 15;\r\n" + 
			"    this.um = (1 << (m.DB - 15)) - 1;\r\n" + 
			"    this.mt2 = 2 * m.t;\r\n" + 
			"}\r\n" + 
			"function montConvert(x) {\r\n" + 
			"    var r = nbi();\r\n" + 
			"    x.abs().dlShiftTo(this.m.t, r);\r\n" + 
			"    r.divRemTo(this.m, null, r);\r\n" + 
			"    if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r, r);\r\n" + 
			"    return r;\r\n" + 
			"}\r\n" + 
			"function montRevert(x) {\r\n" + 
			"    var r = nbi();\r\n" + 
			"    x.copyTo(r);\r\n" + 
			"    this.reduce(r);\r\n" + 
			"    return r;\r\n" + 
			"}\r\n" + 
			"function montReduce(x) {\r\n" + 
			"    while (x.t <= this.mt2) x[x.t++] = 0;\r\n" + 
			"    for (var i = 0; i < this.m.t; ++i) {\r\n" + 
			"\r\n" + 
			"        var j = x[i] & 0x7fff;\r\n" + 
			"        var u0 = (j * this.mpl + (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) & x.DM;\r\n" + 
			"\r\n" + 
			"        j = i + this.m.t;\r\n" + 
			"        x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\r\n" + 
			"\r\n" + 
			"        while (x[j] >= x.DV) {\r\n" + 
			"            x[j] -= x.DV;\r\n" + 
			"            x[++j]++;\r\n" + 
			"        }\r\n" + 
			"    }\r\n" + 
			"    x.clamp();\r\n" + 
			"    x.drShiftTo(this.m.t, x);\r\n" + 
			"    if (x.compareTo(this.m) >= 0) x.subTo(this.m, x);\r\n" + 
			"}\r\n" + 
			"function montSqrTo(x, r) {\r\n" + 
			"    x.squareTo(r);\r\n" + 
			"    this.reduce(r);\r\n" + 
			"}\r\n" + 
			"function montMulTo(x, y, r) {\r\n" + 
			"    x.multiplyTo(y, r);\r\n" + 
			"    this.reduce(r);\r\n" + 
			"}\r\n" + 
			"Montgomery.prototype.convert = montConvert;\r\n" + 
			"Montgomery.prototype.revert = montRevert;\r\n" + 
			"Montgomery.prototype.reduce = montReduce;\r\n" + 
			"Montgomery.prototype.mulTo = montMulTo;\r\n" + 
			"Montgomery.prototype.sqrTo = montSqrTo;\r\n" + 
			"function bnpIsEven() {\r\n" + 
			"    return ((this.t > 0) ? (this[0] & 1) : this.s) == 0;\r\n" + 
			"}\r\n" + 
			"function bnpExp(e, z) {\r\n" + 
			"    if (e > 0xffffffff || e < 1) return BigInteger.ONE;\r\n" + 
			"    var r = nbi(),\r\n" + 
			"    r2 = nbi(),\r\n" + 
			"    g = z.convert(this),\r\n" + 
			"    i = nbits(e) - 1;\r\n" + 
			"    g.copyTo(r);\r\n" + 
			"    while (--i >= 0) {\r\n" + 
			"        z.sqrTo(r, r2);\r\n" + 
			"        if ((e & (1 << i)) > 0) z.mulTo(r2, g, r);\r\n" + 
			"        else {\r\n" + 
			"            var t = r;\r\n" + 
			"            r = r2;\r\n" + 
			"            r2 = t;\r\n" + 
			"        }\r\n" + 
			"    }\r\n" + 
			"    return z.revert(r);\r\n" + 
			"}\r\n" + 
			"function bnModPowInt(e, m) {\r\n" + 
			"    var z;\r\n" + 
			"    if (e < 256 || m.isEven()) z = new Classic(m);\r\n" + 
			"    else z = new Montgomery(m);\r\n" + 
			"    return this.exp(e, z);\r\n" + 
			"}\r\n" + 
			"BigInteger.prototype.copyTo = bnpCopyTo;\r\n" + 
			"BigInteger.prototype.fromInt = bnpFromInt;\r\n" + 
			"BigInteger.prototype.fromString = bnpFromString;\r\n" + 
			"BigInteger.prototype.clamp = bnpClamp;\r\n" + 
			"BigInteger.prototype.dlShiftTo = bnpDLShiftTo;\r\n" + 
			"BigInteger.prototype.drShiftTo = bnpDRShiftTo;\r\n" + 
			"BigInteger.prototype.lShiftTo = bnpLShiftTo;\r\n" + 
			"BigInteger.prototype.rShiftTo = bnpRShiftTo;\r\n" + 
			"BigInteger.prototype.subTo = bnpSubTo;\r\n" + 
			"BigInteger.prototype.multiplyTo = bnpMultiplyTo;\r\n" + 
			"BigInteger.prototype.squareTo = bnpSquareTo;\r\n" + 
			"BigInteger.prototype.divRemTo = bnpDivRemTo;\r\n" + 
			"BigInteger.prototype.invDigit = bnpInvDigit;\r\n" + 
			"BigInteger.prototype.isEven = bnpIsEven;\r\n" + 
			"BigInteger.prototype.exp = bnpExp;\r\n" + 
			"BigInteger.prototype.toString = bnToString;\r\n" + 
			"BigInteger.prototype.negate = bnNegate;\r\n" + 
			"BigInteger.prototype.abs = bnAbs;\r\n" + 
			"BigInteger.prototype.compareTo = bnCompareTo;\r\n" + 
			"BigInteger.prototype.bitLength = bnBitLength;\r\n" + 
			"BigInteger.prototype.mod = bnMod;\r\n" + 
			"BigInteger.prototype.modPowInt = bnModPowInt;\r\n" + 
			"BigInteger.ZERO = nbv(0);\r\n" + 
			"BigInteger.ONE = nbv(1);\r\n" + 
			"function Arcfour() {\r\n" + 
			"    this.i = 0;\r\n" + 
			"    this.j = 0;\r\n" + 
			"    this.S = new Array();\r\n" + 
			"}\r\n" + 
			"function ARC4init(key) {\r\n" + 
			"    var i, j, t;\r\n" + 
			"    for (i = 0; i < 256; ++i) this.S[i] = i;\r\n" + 
			"    j = 0;\r\n" + 
			"    for (i = 0; i < 256; ++i) {\r\n" + 
			"        j = (j + this.S[i] + key[i % key.length]) & 255;\r\n" + 
			"        t = this.S[i];\r\n" + 
			"        this.S[i] = this.S[j];\r\n" + 
			"        this.S[j] = t;\r\n" + 
			"    }\r\n" + 
			"    this.i = 0;\r\n" + 
			"    this.j = 0;\r\n" + 
			"}\r\n" + 
			"function ARC4next() {\r\n" + 
			"    var t;\r\n" + 
			"    this.i = (this.i + 1) & 255;\r\n" + 
			"    this.j = (this.j + this.S[this.i]) & 255;\r\n" + 
			"    t = this.S[this.i];\r\n" + 
			"    this.S[this.i] = this.S[this.j];\r\n" + 
			"    this.S[this.j] = t;\r\n" + 
			"    return this.S[(t + this.S[this.i]) & 255];\r\n" + 
			"}\r\n" + 
			"Arcfour.prototype.init = ARC4init;\r\n" + 
			"Arcfour.prototype.next = ARC4next;\r\n" + 
			"function prng_newstate() {\r\n" + 
			"    return new Arcfour();\r\n" + 
			"}\r\n" + 
			"var rng_psize = 256;\r\n" + 
			"var rng_state;\r\n" + 
			"var rng_pool;\r\n" + 
			"var rng_pptr;\r\n" + 
			"function rng_seed_int(x) {\r\n" + 
			"    rng_pool[rng_pptr++] ^= x & 255;\r\n" + 
			"    rng_pool[rng_pptr++] ^= (x >> 8) & 255;\r\n" + 
			"    rng_pool[rng_pptr++] ^= (x >> 16) & 255;\r\n" + 
			"    rng_pool[rng_pptr++] ^= (x >> 24) & 255;\r\n" + 
			"    if (rng_pptr >= rng_psize) rng_pptr -= rng_psize;\r\n" + 
			"}\r\n" + 
			"function rng_seed_time() {\r\n" + 
			"    rng_seed_int(new Date().getTime());\r\n" + 
			"}\r\n" + 
			"if (rng_pool == null) {\r\n" + 
			"    rng_pool = new Array();\r\n" + 
			"    rng_pptr = 0;\r\n" + 
			"    var t;\r\n" + 
			"    if (navigator.appName == \"Netscape\" && navigator.appVersion < \"5\" && window.crypto) {\r\n" + 
			"\r\n" + 
			"        var z = window.crypto.random(32);\r\n" + 
			"        for (t = 0; t < z.length; ++t) rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;\r\n" + 
			"    }\r\n" + 
			"    while (rng_pptr < rng_psize) {\r\n" + 
			"        t = Math.floor(65536 * Math.random());\r\n" + 
			"        rng_pool[rng_pptr++] = t >>> 8;\r\n" + 
			"        rng_pool[rng_pptr++] = t & 255;\r\n" + 
			"    }\r\n" + 
			"    rng_pptr = 0;\r\n" + 
			"    rng_seed_time();\r\n" + 
			"\r\n" + 
			"}\r\n" + 
			"function rng_get_byte() {\r\n" + 
			"    if (rng_state == null) {\r\n" + 
			"        rng_seed_time();\r\n" + 
			"        rng_state = prng_newstate();\r\n" + 
			"        rng_state.init(rng_pool);\r\n" + 
			"        for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) rng_pool[rng_pptr] = 0;\r\n" + 
			"        rng_pptr = 0;\r\n" + 
			"\r\n" + 
			"    }\r\n" + 
			"\r\n" + 
			"    return rng_state.next();\r\n" + 
			"}\r\n" + 
			"function rng_get_bytes(ba) {\r\n" + 
			"    var i;\r\n" + 
			"    for (i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();\r\n" + 
			"}\r\n" + 
			"function SecureRandom() {}\r\n" + 
			"SecureRandom.prototype.nextBytes = rng_get_bytes;\r\n" + 
			"function parseBigInt(str, r) {\r\n" + 
			"    return new BigInteger(str, r);\r\n" + 
			"}\r\n" + 
			"function linebrk(s, n) {\r\n" + 
			"    var ret = \"\";\r\n" + 
			"    var i = 0;\r\n" + 
			"    while (i + n < s.length) {\r\n" + 
			"        ret += s.substring(i, i + n) + \"\\n\";\r\n" + 
			"        i += n;\r\n" + 
			"    }\r\n" + 
			"    return ret + s.substring(i, s.length);\r\n" + 
			"}\r\n" + 
			"function byte2Hex(b) {\r\n" + 
			"    if (b < 0x10) return \"0\" + b.toString(16);\r\n" + 
			"    else return b.toString(16);\r\n" + 
			"}\r\n" + 
			"function pkcs1pad2(s, n) {\r\n" + 
			"    //2位长度+pin+rnd\r\n" + 
			"    if (n < s.length + 11) {\r\n" + 
			"        //alert(\"密码太长!\");\r\n" + 
			"        return null;\r\n" + 
			"    }\r\n" + 
			"\r\n" + 
			"    var ba = new Array();\r\n" + 
			"    var i = s.length - 1;\r\n" + 
			"\r\n" + 
			"    while(i >= 0 && n > 0) {\r\n" + 
			"    var c = s.charCodeAt(i--);\r\n" + 
			"    if(c < 128) { // encode using utf-8\r\n" + 
			"      ba[--n] = c;\r\n" + 
			"    }\r\n" + 
			"    else if((c > 127) && (c < 2048)) {\r\n" + 
			"      ba[--n] = (c & 63) | 128;\r\n" + 
			"      ba[--n] = (c >> 6) | 192;\r\n" + 
			"    }\r\n" + 
			"    else {\r\n" + 
			"      ba[--n] = (c & 63) | 128;\r\n" + 
			"      ba[--n] = ((c >> 6) & 63) | 128;\r\n" + 
			"      ba[--n] = (c >> 12) | 224;\r\n" + 
			"    }\r\n" + 
			"  }\r\n" + 
			"  ba[--n] = 0;\r\n" + 
			"\r\n" + 
			"    var rng = new SecureRandom();\r\n" + 
			"    var x = new Array();\r\n" + 
			"   while(n > 2) { // random non-zero pad\r\n" + 
			"    x[0] = 0;\r\n" + 
			"    while(x[0] == 0) rng.nextBytes(x);\r\n" + 
			"    ba[--n] = x[0];\r\n" + 
			"  }\r\n" + 
			"  ba[--n] = 2;\r\n" + 
			"  ba[--n] = 0;\r\n" + 
			"\r\n" + 
			"    return new BigInteger(ba);\r\n" + 
			"}\r\n" + 
			"function RSAKey() {\r\n" + 
			"    this.n = null;\r\n" + 
			"    this.e = 0;\r\n" + 
			"    this.d = null;\r\n" + 
			"    this.p = null;\r\n" + 
			"    this.q = null;\r\n" + 
			"    this.dmp1 = null;\r\n" + 
			"    this.dmq1 = null;\r\n" + 
			"    this.coeff = null;\r\n" + 
			"}\r\n" + 
			"function RSASetPublic(N, E) {\r\n" + 
			"    if (N != null && E != null && N.length > 0 && E.length > 0) {\r\n" + 
			"        this.n = parseBigInt(N, 16);\r\n" + 
			"        this.e = parseInt(E, 16);\r\n" + 
			"    } else {}\r\n" + 
			"}\r\n" + 
			"function RSADoPublic(x) {\r\n" + 
			"    return x.modPowInt(this.e, this.n);\r\n" + 
			"}\r\n" + 
			"function RSAEncrypt(text) {\r\n" + 
			"    var m = pkcs1pad2(text, (this.n.bitLength() + 7) >> 3);\r\n" + 
			"    if (m == null) return null;\r\n" + 
			"    var c = this.doPublic(m);\r\n" + 
			"    if (c == null) return null;\r\n" + 
			"    var h = c.toString(16);\r\n" + 
			"    if((h.length & 1) == 0) return h; else return \"0\" + h;\r\n" + 
			"    //if((h.length & 1) == 0) \r\n" + 
			"    //	return h; \r\n" + 
			"    // else \r\n" + 
			"    // 	return \"0\" + h;\r\n" + 
			"\r\n" + 
			"  //var gapLen = 256 - h.length;\r\n" + 
			"   // for (var i = 0; i < gapLen; i = i + 1) {\r\n" + 
			"    //   h = \"0\" + h;\r\n" + 
			"    //}\r\n" + 
			"   // return h;\r\n" + 
			"\r\n" + 
			"}\r\n" + 
			"RSAKey.prototype.doPublic = RSADoPublic;\r\n" + 
			"RSAKey.prototype.setPublic = RSASetPublic;\r\n" + 
			"RSAKey.prototype.encrypt = RSAEncrypt;\r\n" + 
			"var b64map = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\r\n" + 
			"var b64pad = \"=\";\r\n" + 
			"function hex2b64(h) {\r\n" + 
			"    var i;\r\n" + 
			"    var c;\r\n" + 
			"    var ret = \"\";\r\n" + 
			"    for (i = 0; i + 3 <= h.length; i += 3) {\r\n" + 
			"        c = parseInt(h.substring(i, i + 3), 16);\r\n" + 
			"        ret += b64map.charAt(c >> 6) + b64map.charAt(c & 63);\r\n" + 
			"    }\r\n" + 
			"    if (i + 1 == h.length) {\r\n" + 
			"        c = parseInt(h.substring(i, i + 1), 16);\r\n" + 
			"        ret += b64map.charAt(c << 2);\r\n" + 
			"    } else if (i + 2 == h.length) {\r\n" + 
			"        c = parseInt(h.substring(i, i + 2), 16);\r\n" + 
			"        ret += b64map.charAt(c >> 2) + b64map.charAt((c & 3) << 4);\r\n" + 
			"    }\r\n" + 
			"    while ((ret.length & 3) > 0) ret += b64pad;\r\n" + 
			"    return ret;\r\n" + 
			"}\r\n" + 
			"function b64tohex(s) {\r\n" + 
			"    var ret = \"\"\r\n" + 
			"    var i;\r\n" + 
			"    var k = 0;\r\n" + 
			"    var slop;\r\n" + 
			"    for (i = 0; i < s.length; ++i) {\r\n" + 
			"        if (s.charAt(i) == b64pad) break;\r\n" + 
			"        v = b64map.indexOf(s.charAt(i));\r\n" + 
			"        if (v < 0) continue;\r\n" + 
			"        if (k == 0) {\r\n" + 
			"            ret += int2char(v >> 2);\r\n" + 
			"            slop = v & 3;\r\n" + 
			"            k = 1;\r\n" + 
			"        } else if (k == 1) {\r\n" + 
			"            ret += int2char((slop << 2) | (v >> 4));\r\n" + 
			"            slop = v & 0xf;\r\n" + 
			"            k = 2;\r\n" + 
			"        } else if (k == 2) {\r\n" + 
			"            ret += int2char(slop);\r\n" + 
			"            ret += int2char(v >> 2);\r\n" + 
			"            slop = v & 3;\r\n" + 
			"            k = 3;\r\n" + 
			"        } else {\r\n" + 
			"            ret += int2char((slop << 2) | (v >> 4));\r\n" + 
			"            ret += int2char(v & 0xf);\r\n" + 
			"            k = 0;\r\n" + 
			"        }\r\n" + 
			"    }\r\n" + 
			"    if (k == 1) ret += int2char(slop << 2);\r\n" + 
			"    return ret;\r\n" + 
			"}\r\n" + 
			"function b64toBA(s) {\r\n" + 
			"\r\n" + 
			"    var h = b64tohex(s);\r\n" + 
			"    var i;\r\n" + 
			"    var a = new Array();\r\n" + 
			"    for (i = 0; 2 * i < h.length; ++i) {\r\n" + 
			"        a[i] = parseInt(h.substring(2 * i, 2 * i + 2), 16);\r\n" + 
			"    }\r\n" + 
			"    return a;\r\n" + 
			"}\r\n" + 
			"\r\n" + 
			"function getp(pwd,AA) {\r\n" + 
			"    var PublicKey = b64tohex(AA);\r\n" + 
			"    var RSA = new RSAKey();\r\n" + 
			"    \r\n" + 
			"    RSA.setPublic(PublicKey, \"010001\");\r\n" + 
			"    var Res = hex2b64(RSA.encrypt(pwd));\r\n" + 
			"    return Res;\r\n" + 
			"}\r\n" + 
			"\r\n" + 
			"";
	public static String getP(String code,String modules) throws Exception{
		if(invoke==null) {
			ScriptEngineManager manager = new ScriptEngineManager();
			ScriptEngine engine = manager.getEngineByName("javascript");
			engine.eval(GET_VISTOR_ID);
			invoke = (Invocable)engine;
		}
		String c = (String)invoke.invokeFunction("getp",code,modules);
		return c;
	}
	
	public static void main(String[] args) throws Exception{
		//0b67381d1ef9e63ccc78492b2d53e128
		System.out.println(JSUtil.getP("ab13001711415","ALJPKBerY4TfdUPB6xwPUEnjQNaIDF9ZHPHVhVN6MKOiyFnFpld+4z3XanqR8lhT0BfyM/xkN2ZkE6OMMB6QRXKdOI8UxhAy7L3S/Kp1ncRtpBdhF09ZO/xotfFzVy3xLYigRK6QH6N6Bkdf02njiqyLWLfWIvExHva8vRo3Fpyt5w2KMwSTTUZzhIeCVW9bE8wkAvKCk5OTIFDDN89nZOo0dV2fFucNw45w5FAGagL7+wlhYjyUBOlxnBysdywi7uPfHO8A2wcUqt2x/0llr1LvB7AWzEOPtBgkk9DtQP1WZ7TDtAWN6/F5ooWi1B9YDjGJMbajZzpDNQXiSCGHmeU="));
		
	}
	
}
